import api from './index'

// 获取充值订单列表
export const getRechargeOrders = (params?: { page?: number; page_size?: number }) => {
  return api.get('/recharge/order', { params })
}

// 获取充值订单详情
export const getRechargeOrderById = (id: number) => {
  return api.get(`/recharge/order/${id}`)
}

// 创建充值订单
export const createRechargeOrder = (data: any) => {
  return api.post('/recharge/order', data)
}

// 更新充值订单
export const updateRechargeOrder = (id: number, data: any) => {
  return api.put(`/recharge/order/${id}`, data)
}

// 删除充值订单
export const deleteRechargeOrder = (id: number) => {
  return api.delete(`/recharge/order/${id}`)
}